import request from '../request'
export function getRoleList (params) {
  return request({
    url: '/system/role/list',
    method: 'get',
    params,
    hideLoading: true
  })
}

export function getPermissions (params) {
  return request({
    url: '/system/role/permissions',
    method: 'get',
    params,
    hideLoading: true
  })
}

export function roleAdd (data) {
  return request({
    url: '/system/role/add',
    method: 'post',
    data
  })
}

export function getRoleInfo (params) {
  return request({
    url: '/system/role/info',
    method: 'get',
    params,
    hideLoading: true
  })
}

export function roleUpdate (data) {
  return request({
    url: '/system/role/update',
    method: 'post',
    data,
    hideLoading: true
  })
}

export function roleRemove (data) {
  return request({
    url: '/system/role/remove',
    method: 'post',
    data,
    hideLoading: true
  })
}
